package com.hnevc.mytrafficdemo.activity;

import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.hnevc.mytrafficdemo.R;

public class SplashActivity extends AppCompatActivity {
    
    Handler mHander = new Handler(){
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            Intent intent = new Intent();
            intent.setClass(SplashActivity.this, MainActivity.class);
            startActivity(intent);
        }
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);


        mHander.postDelayed(new Runnable() {
            @Override
            public void run() {
                mHander.sendEmptyMessage(100);
            }
        },3000);
    }
}
